﻿using System;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using O1.Storage;

namespace Tests.O1.Storage
{
    [TestClass]
    public class InstrumentsTests
    {
        //[TestMethod]
        //public void StorageSzAndVersionMaintainsSizeAsExpected()
        //{
        //    Instruments.VerifySize(128, 22222222222).Should().Be(128);
        //}

        //[TestMethod]
        //public void StorageSzAndVersionMaintainsMaxSizeAsExpected()
        //{
        //    Instruments.VerifySize(short.MaxValue, 22222222222).Should().Be(short.MaxValue);
        //}

        //[TestMethod]
        //public void StorageSzAndVersionMaintainsMinSizeAsExpected()
        //{
        //    Instruments.VerifySize(short.MinValue, 22222222222).Should().Be(short.MinValue);
        //}

        //[TestMethod]
        //public void StorageSzAndVersionMaintainsMaxVersionAsExpected()
        //{
        //    /*
        //    	281 474 976 710 655
        //        281 474 976 645 120
        //        -------------------
        //                    065 535
        //    */
        //    const long max6Bytes = 281474976710655;
        //    Instruments.VerifyVersionId(128, max6Bytes).Should().Be(max6Bytes);
        //}

        //[TestMethod]
        //public void StorageSzAndVersionMaintainsMinVersionAsExpected()
        //{
        //    Instruments.VerifyVersionId(128, 0).Should().Be(0);
        //}

        //[TestMethod]
        //public void StorageSzAndVersionCommitsAsExpected()
        //{
        //    Instruments.CommitAndVerifySize(1, 0).Should().Be(1);
        //    Instruments.CommitAndVerifyIsCommitted(1, 0).Should().BeTrue();
        //}

        //[TestMethod]
        //public void StorageSzAndVersionUncommitsAsExpected()
        //{
        //    Instruments.UncommitAndVerifySize(1, 0).Should().Be(1);
        //    Instruments.UncommitAndVerifyIsUncommitted(1, 0).Should().BeTrue();
        //}
    }
}
